namespace System.Linq.Expressions
{
    public class ItemBase
    {
        protected readonly object f_Object;
        protected readonly Type f_ObjectType;
        protected readonly string f_Name;
        protected AttributesExtractor f_ObjectAttributes;

        public string Name { get { return f_Name; } }

        public object Object { get { return f_Object; } }

        public AttributesExtractor ObjectAttribute { get { return f_ObjectAttributes ?? (f_ObjectAttributes = new AttributesExtractor(f_ObjectType)); } }


        protected ItemBase(object Obj, string Name) : this((Obj).GetType(), Name) { f_Object = Obj; }

        public ItemBase(Type type, string Name)
        {
            f_ObjectType = type;
            f_Name = Name;
        }
    }
}